package com.lizemin.importcase.group;

import org.springframework.context.annotation.DeferredImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * @author lzm
 * @date 2025/10/30 19:11
 * @description 需要注意的是：该类不需要加@configuration，否则会影响DeferredImportSelector的正常功能
 */
public class MySqlConfigSelector implements DeferredImportSelector {
    @Override
    public String[] selectImports(AnnotationMetadata importingClassMetadata) {
        return new String[]{MySqlConfig.class.getName()};
    }

    @Override
    public Class<? extends Group> getImportGroup() {
        return DataSourceGroup.class;
    }
}
